package com.example.demo.service.impl;

import com.example.demo.dao.IRoomDao;
import com.example.demo.entity.Room;
import com.example.demo.service.IRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoomServiceImpl implements IRoomService {

    @Autowired
    private IRoomDao roomDao;

    @Override
    public void insert(Room room) {
        roomDao.insert(room);
    }

    @Override
    public void update(Room room) {
        roomDao.update(room);
    }

    @Override
    public void delete(int id) {
        roomDao.delete(id);
    }

    @Override
    public Room selectById(int id) {
        return roomDao.selectById(id);
    }

    @Override
    public List<Room> selectAll() {
        return roomDao.selectAll();
    }

    @Override
    public List<Room> selectByStatus() {
        return roomDao.selectByStatus();
    }
}
